﻿@using Choucius.Boilerplate9.Web.Models.T4000Printers
@using Choucius.Boilerplate9.Web.Startup
@model T4000PrinterViewModel
@{
    ViewBag.Title = L("T4000Printers");
    ViewBag.CurrentPageName = PageNames.T4000Printers;
}
@section scripts {
    <script type="text/javascript">
        $(document).ready(function () {
            $('#myForm').submit(function () {
                $('#submitButton').attr('disabled', 'disabled');
            });
        });
    </script>
}

<section class="content-header">
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-6">
                <h1>@L("T4000Printers")</h1>
            </div>
        </div>
    </div>
</section>
<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                @using (Html.BeginForm("PrintPost", "T4000Printers", FormMethod.Post, new { id = "myForm" }))
                {
                    <div class="modal-body">
                        <div class="form-group row required">
                            <label class="col-md-3 col-form-label">@L("TagPrefix")</label>
                            <div class="col-md-9">
                                @Html.TextBoxFor(m => m.TagPrefix)
                                <label class="col-md-3 col-form-label">输入标签前缀，表示容器型号，通常为ERP-ID的后四位（如0209），参见《RFID编码规则》</label>
                            </div>
                        </div>
                        <div class="form-group row required">
                            <label class="col-md-3 col-form-label">@L("TagCount")</label>
                            <div class="col-md-9">
                                @Html.TextBoxFor(m => m.TagCount)
                            </div>
                            <label class="col-md-3 col-form-label">本次打印标签的数量</label>
                        </div>
                    </div>
                    <div class="modal-footer justify-content-between">
                        <input type="submit" value="打印" id="submitButton" />
                    </div>
                }
            </div>
        </div>
    </div>
</section>